/*
 * edit by yang
 * 2016.6.28
 * mxu接口配置
 */


angular.module('app').constant('config', {
	base_url : window.CONFIG.apiUrl+'/api',
	loginUrl : window.CONFIG.baseUrl + '/',
	//errorUrl : window.CONFIG.baseUrl + '/main/404',
	error_tip : '访问错误',
	errorMessage : '暂无数据',


	//magic
	magic : window.CONFIG.baseUrl+'/magic/main.php?gmid=412&ext=client_type%3D%26site_id%3D1%26page_id%3D0%26page_data_id%3D0%26content_type%3D0',

	port : {
		i : {
			/***公用****/
			client_point : '/content/client_point/{id?}',
			logout : '/logout',
			auth_info : '/auth/user/info',
			cloumn_list : '/content/column/{fid?}',
			content_column :'/content/column/{fid?}',
			user_update : '/auth/user/update',
			
			/***首页***/
			content_num : '/home/get_num_info',
			week_num : '/home/get_beforweek_info/{type}',
			logs_show : '/home/logs_show',
			system_status : '/home/get_system_status',
			shortcut_operation : '/home/get_shortcut_operation',
			shortcut_operate : '/home/shortcut_operation',

			/***文稿***/
			news_create : '/news/create',
			upload_indexpic : '/news/upload_indexpic',
			create_draft : '/news/create_draft',
			draft_detail : '/news/draft_detail/{id}',
			get_last_draft : '/news/get_last_draft',
			news_detail : '/news/detail/{id}',
			news_update : '/news/update/{id}',
			delete_draft : '/news/delete_draft/{draft_id?}',
			
			/***图集***/
			tuji_create_from_zip : '/tuji/create_from_zip',
			tuji_upload:'/tuji/upload',
			tuji_create:'/tuji/create',
			tuji_detail:'/tuji/detail/{id}',
			tuji_delete_pic:'/tuji/delete_pic/{id}',
			tuji_revolveimg :'/tuji/revolveimg/{id}',
			tuji_update:'/tuji/update/{id}',
			tuji_piclinks:'/tuji/piclinks',
			tuji_tuji_img: '/tuji/tuji_img/{id}',
			get_water_status:'/functionSet/get_water',

			/** 内容列表 **/
			content_nav:'/content/column',
			content_list:'/content/list',
			content_type:'/content/type',
			content_status:'/content/status',
			content_order:'/content/order',
			content_top:'/content/update/{id}',
			content_weight:'/content/update/{id}',
			content_del:'/content',
			content_publish:'/content/audit/{id}',
			content_point:'/content/content_point_sub',
			content_change_column:'/content/change_content_column',
			content_vod_transcode:'/vod/get_transcode_status',
			content_vod_detail:'/vod/{id}',
			content_forward:'/content/forward/{app}',
			content_preview:'/content/preview',
			content_wechat_list:'/content/get_forward_list/wechat',
			content_weibo_list:'/content/get_forward_list/weibo',

			/** 栏目管理 **/
			column_detail:'/content/column/detail/{id}',
			column_modify:'/content/column/{id}',
			column_create:'/content/column',
			column_delete:'/content/column/{id}',
			column_patch:'/content/column/get_name/{ids}',

			/** 用户列表 **/
			customer_list:'/auth/user',
			customer_lock:'/auth/user/lock',
			customer_reset_password:'/auth/user/set_reset_password',
			customer_user_info:'/auth/user/{id}',

			/** 评论列表 **/
			comment_list:'/message/show',
			comment_get_max_id:'/message/get_max_id',
			comment_reminder_number:'/message/new_count',
			comment_status:'/message/audit',
			comment_delete:'/message/delete',


			/** 报料列表 **/
			contribute_list:'/contribute/show',
			contribute_get_max_id:'/contribute/get_max_id',
			contribute_reminder_number:'/contribute/new_count',
			contribute_classify:'/contribute/show_node',
			contribute_review:'/contribute/audit',
			contribute_back:'/contribute/back',
			contribute_delete:'/contribute/delete',
			contribute_update_follow:'/contribute/update_is_follow',
			contribute_reply:'/contribute/reply',

			contribute_category_update:'/contribute/update_node/{id}',
			contribute_category_delete:'/contribute/delete_node/{id}',
			contribute_category_create:'/contribute/create_node',
			
			/***运营***/
			members_list : '/members/show',
			members_group:'/members/show_group',
			create_group : '/members/create_group',
			delete_group : '/members/delete_group/{id?}',
			audit_state : '/members/audit/{member_id?}',
			update_member_group : '/members/member_group/{member_id?}',
			batch_audit : '/members/batch_audit/{member_id?}',
			members_del : '/members/delete/{member_id?}',
			update_group : '/members/update_group/{id?}',

			/** 数据 **/
			statistic_router:'/client/stat/stat',

			/** 角色列表 **/
			role_list : '/auth/role',
			role_delete : '/auth/role',
			role_detail:'/auth/role/{id}',

			/** 权限 **/
			authority_list:'/auth/permission',
			authority_create:'/auth/role/{id}',
			
			/***频道***/
	   	   	live_live:'/live/live',
     	   	live_detail:'/live/detail/{id}',
     	   	live_update:'/live/update/{id}',
            live_audit:'/live/audit/{id}',

			/***节目单***/
            program_channel:'/program/channel',
            program_week:'/program/week/{id}',
            program_program:'/program/program/{id}',
            program_update:'/program/update/{id}',
            program_upload: '/program/upload',

			/***节目计划***/
            program_create_plan:'/program/create_plan',
            program_plan_list:'/program/plan_list/{id}',
            program_update_plan:'/program/update_plan/{id}',
            program_delete_plan:'/program/delete_plan/{id}',
           
            /******视频******/
     	    upload_vod : '/vod',
     	    vod_detial :'/vod/{id}',
     	    update_indexpic : '/vod/update_indexpic/{id}',
     	    transcode_config : '/vod/get_transcode_type',

		    /**系统设置 短信服务器**/
			text_info :'/sys-setting/sms/count',
			text_template : '/sys-setting/sms/server',

			/**系统设置 云授权**/
			cloud_user:'/m2ocloud/user',
			cloud_register:'/m2ocloud/user/register',
			cloud_authorize:'/m2ocloud/authorize',
			cloud_verify:'/verify/password',

			/**系统设置 邮件服务器**/
			email_create:'/sys-setting/email/server',
			email_verify:'/sys-setting/email/service/verify',
			email_template:'/sys-setting/email/module',

			/***功能设置  屏蔽词***/
			bindWord_list : '/functionSet/ban_show',
			bindWord_delete : '/functionSet/ban_delete',
			bindWord_empty : '/functionSet/ban_clean',
			bindWord_create : '/functionSet/ban_create',
			bindWord_get_set:'/functionSet/message_setting',
			bindWord_set : '/functionSet/ban_trigger',

			/***功能设置  评论设置***/
			getComment_set : '/functionSet/message_setting',
			global_set : '/functionSet/message_global_set',
			comment_set : '/functionSet/message_state_set',

			/***功能设置  水印设置***/
			water_get : '/functionSet/get_water',
			upload_img : '/functionSet/upload_water',
			update_pic_water : '/functionSet/update_pic_water',
			preview_water : '/functionSet/preview_water',

			/***功能设置  转码设置***/
			transcode_get : '/functionSet/vod_config_show',
			transcode_update: '/functionSet/vod_config_update/{id}',

			/******投票******/
			vote_list : '/vote/show',
			vote_audit : '/vote/audit',
			vote_delete : '/vote/delete',
			vote_result : '/vote/get_vote_result',
			vote_open : '/vote/open',
			vote_create:'/vote/create',
			vote_option_update:'/vote/update',
			vote_option_delete:"/vote/delete/{id}",
			vote_category:'/vote/vote_sort',
			vote_create_category:'/vote/create_sort',
			vote_update_category:'/vote/update_sort/{id}',
			vote_delete_category:'/vote/delete_sort/{id}',

			/******新增编辑投票******/
			vote_detail : '/vote/detail/{id}',
			vote_save : '/vote/update',
			vote_upload_image : '/vote/upload_image',

			/******扩展******/
			m2ocloud_service : '/m2ocloud/service',
			m2ocloud_detail : '/m2ocloud/service/{id}',
			service_stop: '/m2ocloud/service/stop/{id}',
			service_open : '/m2ocloud/service/open/{id}',
			client_detail : '/client/{detail_url}',
			service_renew : '/m2ocloud/service/renew/{id}',
			service_sort : '/m2ocloud/service/sort',

			
			/******终端******/
			wco_wechat:'/client/wco/wechat',
			wco_weibo:'/client/wco/weibo',
			app_app:'/client/app/app',

			/******终端  站点******/
			site_default:'/content/get_default_site',
			site_info:'/content/site/{id}',
			site_upload_image:'/content/upload_image',
			generate : '/content/generate_page',

			/******终端 首页设置******/
			update_home_template : '/content/update_home_template',
			get_deploy_template : '/content/get_deploy_template',

			/******终端  栏目模板设置******/
			template_show:'/content/template_show',
			update_template:'/content/update_template',
			get_deploy_template:'/content/get_deploy_template',

			/******终端 会员设置******/
			mem_register : '/terminal/member-setting/register',
			mem_change_register : '/terminal/member-setting/register/{id}',
			member_info:'/terminal/member-setting/info',
			mem_login_list:'/terminal/member-setting/login',
			mem_login_status:'/terminal/member-setting/login/{id}',
			mem_QQ_info:'/terminal/member-setting/client/tqqlogin',
			mem_WB_info:'/terminal/member-setting/client/sinalogin',

			member_nav:'/terminal/member-setting/nav',
			member_nav_delete:'/terminal/member-setting/nav/{id}',
			member_nav_modify:'/terminal/member-setting/nav/{id}',
			member_nav_order:'/terminal/member-setting/sort'
		}
	},
	getUrl : function( key, sign ){
		sign = sign || 'i';
		if( !this.port[sign][key] ){
			return [key, sign].join('_');
		}
		//console.log();
		return this.base_url + this.port[sign][key];
		//return this.base_url.replace('{subdomains}', this.subdomains) + this.port[sign][key];
	},
	page :[10,20,30,50]
});
